//
//  LCGroupCell.m
//  YinYueTai
//
//  Created by CongCong on 15-7-22.
//  Copyright (c) 2015年 CongCong. All rights reserved.
//

#import "LCGroupCell.h"
#import "UIImageView+WebCache.h"

#define kScreenSize [UIScreen mainScreen].bounds.size
@implementation LCGroupCell

- (void)awakeFromNib {
    // Initialization code
}
- (void)showWithModel:(LCGroupListModel *)model andTextSize:(CGSize)size
{
    if ([model.coverimg isEqualToString:@""]) {
        self.content.frame = CGRectMake(10, 30, kScreenSize.width-40, size.height);
        self.image.hidden = YES;
        self.title.text = model.title;
        self.content.text = model.content;
        self.addTime.text= model.addtime_f;
        self.coummentTimes.text = model.counterList.comment.stringValue;
        
        
    }
    else
    {
        self.content.frame = CGRectMake(80, 40, kScreenSize.width-100, size.height);
        self.content.text = model.content;
        self.image.hidden = NO;
        self.title.text = model.title;
        self.addTime.text= model.addtime_f;
        self.coummentTimes.text = model.counterList.comment.stringValue;
        [self.image sd_setImageWithURL:[NSURL URLWithString:model.coverimg] placeholderImage:[UIImage imageNamed:@"hoder"]];
        
    }
}
@end
